1. Technical Field
The present invention is directed to an apparatus and method for providing metadata for the creation of semi-deployed enterprise Java beans. In particular, the present invention is directed to an apparatus and method for including, in a Java Archive (JAR) file, such metadata as to provide an enterprise Java bean with deployment information to aid in deployment of the undeployed enterprise Java bean.
2. Description of Related Art
Enterprise Java beans (EJBs) are components in the Java programming language (Java is a trademark of Sun Microsystems, Inc.) used when building a distributed transaction-oriented enterprise application. EJB systems allow developers to focus on the actual business architecture of a business model, rather than worry about endless amounts of programing and coding needed to connect all the working parts. This task is left to EJB server vendors. Developers just design (or purchase) the needed EJB components and arrange them on the server. Because ETB systems are written in Java, they are platform independent. Being object oriented, they can be implemented into existed systems with little or no recompiling and configuring.
The EJB standard defines a number of roles and scenarios that are used to define the content and capability of the EJB through various stages in its development. An EJB is initially created with business logic but no knowledge of how its persistence will be managed. Such a bean is known as an xe2x80x9cundeployedxe2x80x9d EJB. The mapping between the persistent fields of an xe2x80x9cundeployedxe2x80x9d EJB and a persistent storage, such as a database, is completed at a separate time. This mapping requires additional code to be generated. The resulting Java code created based on the undeployed EJB and the additional code generated to map to a specific persistent storage and run in a specific container is known as a xe2x80x9cdeployedxe2x80x9d EJB.
The separation of these stages is intentional and has two key benefits. First, it allows domain specific experts to concentrate their roles. Thus, the bean provider is an application domain expert who does not need to program transactions, concurrency or other runtime infrastructure into the EJB. Likewise, the deployer is an expert in a specific operational environment who must generate the additional classes to manage the EJB at runtime.
Second, it provides for portability of the undeployed bean onto any compliant server. It is possible to purchase undeployed EJBs from other companies and then deploy them into the application server of choice. The undeployed EJB will have no knowledge of the server in which it will eventually run.
The problem with this separation is that it provides no intermediate position. In other words, if an EJB creator does have information such as how an EJB""s persistent fields should be mapped to a data storage, there is no mechanism to indicate this in the EJB short of creating a deployed bean. However, a deployed bean is specific to one server, which prevents the bean from being portable across servers.
Thus, it would be beneficial to have an apparatus and method for creating semi-deployed enterprise Java beans incorporating the business logic and some additional information that may be used to aid the deployment or execution of the enterprise Java bean, while the undeployed enterprise Java bean still remains portable to other server environments.
The present invention provides an apparatus, method, and system for generating semi-deployed enterprise java beans. The apparatus, method and system make use of metadata to identify an intended deployment of an undeployed enterprise java bean. The metadata may be packaged with the undeployed enterprise java bean into a java archive file which is provided to a deployment tool either on the same computing device or a different computing device. The deployment tool may make use of the metadata when generating deployment classes for the undeployed enterprise java bean. However, if the deployment tool is unable to recognize the metadata or the use of the metadata is not wanted, the deployment tool may also deploy the undeployed enterprise java bean in a conventional manner.